package cn.alpha.intell.rbtlib.utils;

import android.content.Context;

import java.util.HashMap;

import cn.alpha.intell.rbtlib.BuildConfig;
import cn.alpha.intell.rbtlib.broadcast.OSApp;
import cn.alpha.intell.rbtlib.rbt.utils.RBTDeviceUtil;

/**
 * Created by zhangxiliang on 2017/2/20.
 */
public class UmengKey {

    private static HashMap<String,String> mDebugKeyMap=new HashMap<String,String>();

    private static HashMap<String,String> mProductKeyMap=new HashMap<String,String>();


    static {
        mDebugKeyMap.put(OSApp.LUANCHER.getValue(),"58aa63ce4ad1563c8b0005e3");
        mDebugKeyMap.put(OSApp.SETTING.getValue(),"58aa62a87666134d530012df");
        mDebugKeyMap.put(OSApp.MUSIC.getValue(),"58aa625b8f4a9d6e4f00009a");
        mDebugKeyMap.put(OSApp.VIDEO.getValue(),"58aa62857f2c7453220017fa");
        mDebugKeyMap.put(OSApp.ROBOTX.getValue(),"58aa62c7a32511765f003a2c");
        mDebugKeyMap.put(OSApp.CAMERA.getValue(),"58aa62f465b6d633ed001761");
        mDebugKeyMap.put(OSApp.GALLERY.getValue(),"58aa6319e88bad5eff001dc0");
        mDebugKeyMap.put(OSApp.PNIAO.getValue(),"58aa6336bbea830dee002574");
        mDebugKeyMap.put(OSApp.STORY.getValue(),"58aa6361f43e483935001fad");
        mDebugKeyMap.put(OSApp.TOWER.getValue(),"58aa6397cae7e773bf0008bd");
        mDebugKeyMap.put(OSApp.IM.getValue(),"58aa61187666136964000d8d");




        mProductKeyMap.put(OSApp.IM.getValue(),"58a69948f5ade467520023a1");
        mProductKeyMap.put(OSApp.MUSIC.getValue(),"58a699b07f2c741658001c93");
        mProductKeyMap.put(OSApp.VIDEO.getValue(),"58a699dccae7e7309c001225");
        mProductKeyMap.put(OSApp.SETTING.getValue(),"58a699f78f4a9d46d40000fb");
        mProductKeyMap.put(OSApp.ROBOTX.getValue(),"58a69a0df43e48019b0018c6");
        mProductKeyMap.put(OSApp.CAMERA.getValue(),"58a69a27766613250500076b");
        mProductKeyMap.put(OSApp.GALLERY.getValue(),"58a69a48a32511237f00141c");
        mProductKeyMap.put(OSApp.PNIAO.getValue(),"58a69a5e45297d6406000e60");
        mProductKeyMap.put(OSApp.STORY.getValue(),"58a69a7ef29d9847fe001522");
        mProductKeyMap.put(OSApp.TOWER.getValue(),"58a69a947666131e5a001a21");
        mProductKeyMap.put(OSApp.LUANCHER.getValue(),"58aa60884ad1563c4b000448");
    }


    public static String getUmengKeyByPackageName(Context context){
        String packageName=context.getPackageName();

        return RBTDeviceUtil.isDebugMode()?mDebugKeyMap.get(packageName):mProductKeyMap.get(packageName);
    }
}
